<?php
namespace Home\Controller;
use Think\Controller;
class MainController extends BaseController{
	public function index(){
		$bannerCid		= M('Slide') -> where(array('category_id' => '0')) -> getField('cid');
		$banner			= M('Gallery') -> where(array('cid' => $bannerCid)) -> select();
		
		$where['category_id'] = 28;
		$where['thumb'] = array('NEQ','');
		$ldgh = M('Article') -> where($where) -> select();
		
		$id = M('Page') -> where(array('category_id' => 18)) -> getField('id');
		$cid = M('Page') -> where(array('id' => $id)) -> getField('cid');
		$kyyf = M('Gallery') -> where(array('cid' => $cid)) -> select();
		
		$this -> assign('banner',$banner);
		$this -> assign('ldgh',$ldgh);
		$this -> assign('kyyf',$kyyf);
		$this -> display();
	}
}